<?php
    error_reporting(E_ERROR);
    session_start();
/*
    // check referer !! 
    if(! $_SESSION['isLogin']){
        header("Location: index.php");
        exit();
        return;
    }
*/

    $m = intval($_SESSION['money']);
    $n  = intval($_GET['n']);
    $_SESSION['money'] = $m - $n;
    header("Location: main.php");
?>

### 